<?php
require_once 'autoload.php';

if ($_POST['frmLogin']) {
  $_POST['frmServidor'] = 'localhost';
  try {
    $oConexao = new conexao($_POST['frmServidor'], $_POST['frmUsuario'], $_POST['frmSenha']);
  } catch (Exception $oErro) {
    echo $oErro->getMessage();
  }
}
?>

<style type="text/css">
  #login th {
    text-align: right;
  }

  #tituloLogin {
    text-align: center;
    font-weight: bold;
    font-size: 20px;
  }
</style>

<form method="post" action="index.php">
  <div id="login">
    <table align="center">
      <tr>
        <td colspan="2"><div id="tituloLogin">Entrar no dbadmin-alcides2</div></td>
      </tr>
      <tr>
        <th>Usuario</th>
        <td><input type="text" name="frmUsuario"></td>
      </tr>
      <tr>
        <th>Senha</th>
        <td><input type="password" name="frmSenha"></td>
      </tr>
      <tr>
        <th>Servidor (HOST ou IP)</th>
        <td><input type="text" value="<?php echo $_POST['frmServidor']?>" name="frmServidor"></td>
      </tr>
      <tr>
        <th></th>
        <td><input type="submit" value="Entrar" name="frmLogin"></td>
      </tr>
    </table>
  </div>
</form>